﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Forum.aspx.cs" Inherits="Forum" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h3><strong>Forum</strong></h3>
			    
    <div class="contentarea">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="MessageGridView" runat="server" 
                    DataSourceID="MessageObjectDataSource" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" CellPadding="5" 
                    CellSpacing="5" DataKeyNames="Id">
                    <Columns>
                        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:ObjectDataSource ID="MessageObjectDataSource" runat="server" 
            EnablePaging="True" OldValuesParameterFormatString="original_{0}" 
            SelectCountMethod="GetMessageFromForumCount" SelectMethod="GetMessageFromForum" 
            TypeName="MyForum.Business.Controllers.MessageController" 
            SortParameterName="sortExpression">
            <SelectParameters>
                <asp:QueryStringParameter QueryStringField="id" Name="forumId" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
